package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.ArticleTypeMapper;
import com.example.shoppingmall.pojo.Applet;
import com.example.shoppingmall.pojo.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ArticleTypeService {
    @Autowired
    ArticleTypeMapper articleTypeMapper;

    public List<Article> getarticlelist(Integer pageno,Integer pageSize){
        return articleTypeMapper.getarticlelist(pageno,pageSize);
    }

    public int articlecount(){
        return articleTypeMapper.articlecount();
    }

    public int AddArticle(String articlename){
        return articleTypeMapper.AddArticle(articlename);
    }

    public int UpdArticle(Article article){
        return articleTypeMapper.UpdArticle(article);
    }

    public int DelArticle(int id){
        return articleTypeMapper.DelArticle(id);
    }

    public Article selArticle(Integer id){
        return articleTypeMapper.selArticle(id);
    }

    public List<Article> getarticlelistsall(){
        return articleTypeMapper.getarticlelistsall();
    }
}
